Skip to content

refactor(ci3): consume ci3 as a shared submodule - #25516

Open
charlielye wants to merge 9 commits into
nextfrom
cl/ci3-submodule
Open

charlielye wants to merge 9 commits into
nextfrom
cl/ci3-submodule

Conversation

@charlielye

@charlielye charlielye commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Replaces this repo's in-tree ci3/ with the shared repo aztec-labs-eng/ci3, which was split out of aztec-node's copy with its full history (531 commits).

Why

The two copies had drifted: 43 files differed, and this repo's version was months behind on the logic both share. Examples of what this repo picks up:

  • cache_content_hash: ordered include/exclude patterns, where !-negation and last-match-wins are supported.
  • docker_isolate: the container-name reclaim race fix (a same-name sibling is waited out instead of killed mid-run).
  • source_refname: ci_default_branch / ci_dashboard_section, replacing a hardcoded master.
  • deploy_npm: per-channel npm dist-tags instead of everything sharing prerelease.
  • release_prep_package_json: --check validation and scoped-resolutions mode.
  • log_ci_run: dashboard sections scoped by <org>/<repo>, which is what makes this repo's runs show up on the dashboard landing page at all — today they land in the legacy unscoped ci-run-prs key and are invisible there.

What is in this PR

  • ci3/ becomes a submodule pinned to main, declared shallow = true.
  • Scripts this repo uses move to scripts/: assert_public_release, gcp_artifact_login, publish_npm_release, and merge_train_failure_slack_notify as scripts/merge-train/slack-notify.sh. Call sites are updated. publish_npm_release moves into the shared ci3 with feat: pack mode for deploy_npm and a trusted-publishing publisher aztec-labs-eng/ci3#2. Removed because nothing calls them: merge_train_stale_check, release_canary_slack_notify (hardcoded to a canary branch) and npm/.npmrc. merge-queue-dequeue-notify.yml loses its dequeued job (there is no merge queue) and becomes merge-train-notify.yml, which keeps the post when a merge-train PR merges.
  • ci.sh and bootstrap.sh check the submodule is initialised and say how to fix it, since both source ci3 on their first line. bootstrap.sh still owns pulling the remaining submodules.
  • Every checkout of this repository is followed by a step that initialises only the ci3 submodule (21 checkouts across 19 workflows). Workflows can use ci3 without naming it, through a repo script that sources it, so this does not try to track which ones do. submodules: true is deliberately not used: here it would also clone noir-repo and the contract libraries into every job. The step is a no-op on refs from before ci3 became a submodule, which the sync and port workflows check out.
  • ci.sh and the two barretenberg benchmark scripts stop re-sourcing source_redis, source_refname and source_cache, which ci3/source already includes.
  • In the shared repo, bootstrap_ec2 initialises the ci3 submodule on the remote EC2 instance (its shallow fetch does not bring submodules) and derives the checkout directory from GITHUB_REPOSITORY rather than hardcoding a repo name.

Known deltas to work through

This is a draft because adopting the shared version changes behaviour that was repo-specific here:

  1. Merge-train hooks in bootstrap_ec2. The old copy called merge_train_failure_slack_notify and release_canary_slack_notify from bootstrap_ec2; the shared version has no such calls. The scripts still exist in ci3-local/ and the merge-queue-dequeue-notify.yml path still works, but these two call sites are currently dropped. Resolved: the canary notifier had no live use and is removed. Merge-train failures now post from a Notify merge-train failure step in ci3.yml, which links the build log (CI_LOG_ID).
  2. Merge-train and merge-queue policy in run_test_cmd. The shared version tracks history and notifies flakes for main-branch runs; this repo's keyed off gh-readonly-queue/, backport-to-v2-staging and the spartan trains. Needs a config knob rather than a hardcoded branch list.
  3. master vs the default branch. CI_FULL now comes from ci_default_branch. Checked: it reads the remote's default branch, so next here.
  4. GCP secret name. The shared bootstrap_ec2 exports GCP_HELM_SA_KEY_B64; this repo previously exported GCP_PRIVATE_NPM_DEPLOY_B64. Checked: only bootstrap_ec2 uses the name, to pass the key from the runner to the instance, so the rename is self-contained.
  5. npm auth path. The shared deploy_npm sources source_npm_auth; this repo used NPM_CONFIG_GLOBALCONFIG with ci3/npm/.npmrc. That file was unreferenced and is removed. To confirm with a ci-release-pr run.
  6. Instance naming. Merge-train PRs previously got a commit-sha suffix so concurrent trains did not reap each other; the shared bootstrap_ec2 does not do that. Likely covered: .github/ci3.sh already sets INSTANCE_POSTFIX to the PR's commit count for merge-train PRs, which separates their instances.

Each is a candidate for a per-repo config file in the shared repo rather than a fork of the script.

Depends on

The matching aztec-node PR, which is the pilot consumer and will land first.

Rebuilt on next (latest: 2026-11-05)

Rebased onto current next, and ci3 pinned to ci3 main (a379ffc).

Earlier rebuild (2026-10-22)

Rebuilt on current next with the same net effect, pinned to ci3 b505e87, which carries aztec-node's ci3/ changes since the split. Changes to this repo's ci3/ since the original base, and where they went:

ipc-runtime/bootstrap.sh has since started calling assert_public_release, which is updated to the ci3-local/ path along with the other callers.

Also fixed in an earlier rebuild: merge-queue-dequeue-notify.yml runs ci3-local/merge_train_failure_slack_notify, which calls ci3/slack_notify, but its checkouts were not getting the submodule, so dequeue notifications would have failed.

next no longer has a merge queue (the last merge_group run was 2026-09-17), so deltas 1 and 2 above matter less than when they were written: they describe merge-queue and merge-train behaviour.

charlielye and others added 6 commits November 5, 2026 16:47
ci3 now lives in aztec-labs-eng/ci3, shared with aztec-node, so the two repos
stop drifting: this repo's copy was months behind on the logic both share. The
tree here is replaced by the submodule.

Scripts specific to this repo (the merge-train and canary notifiers, the public
release assertion, the GCP artifact login and the npm release publisher) move
to ci3-local/ rather than into the shared repo, carrying their latest changes,
with call sites updated.

ci.sh and bootstrap.sh check the submodule is initialised before sourcing it.
ci.sh and the two barretenberg benchmark scripts stop re-sourcing
source_redis, source_refname and source_cache, which ci3/source already
includes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Workflows can use ci3 without naming it, through any repo script that sources
it, so every checkout of this repository gets it, via a step that initialises
only ci3: `submodules: true` would also clone noir-repo and the contract
libraries into every job. The step is a no-op on refs from before ci3 became
a submodule, which the sync and port workflows check out.

The two workflows calling the scripts now in ci3-local/ use the new paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ci3's scripts used only by ci3 itself now live under internal/ (still on PATH),
including source_redis, source_refname and source_cache, which this branch
already stops sourcing directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes the benchmark run, which failed before starting: sem_sched ran its
semc helper by a path relative to its own directory, which moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared ci3 retries a failing test only when a matching entry sets retry: true; owners no
longer grant a retry. Every entry with owners sets it, so the same tests stay tolerated as
flakes. The header documents retry, notify_on and channel.
Runner logs published to S3, one log_publish, no SSH tunnel to the CI redis, the dashboard's
server API removed, bench_upload, explicit test retries, and CURRENT_VERSION dropped.
Picks up aztec-labs-eng/ci3#9: a failed docker compose up fails the test, carried over from
this repo's in-tree copy (#25691).
ci3-local held what was left of this repo's in-tree ci3 that the shared ci3 does not carry. The
scripts this repo uses move to scripts/: assert_public_release, gcp_artifact_login,
publish_npm_release, and merge_train_failure_slack_notify as scripts/merge-train/slack-notify.sh
beside the other merge-train scripts (without its merge-queue dequeued mode). Removed with no
callers: merge_train_stale_check (its workflow is gone), release_canary_slack_notify (hardcoded to
a canary branch and only called from the old bootstrap_ec2) and npm/.npmrc (deploy_npm uses
source_npm_auth).

The shared bootstrap_ec2 does not post merge-train failures, so ci3.yml does: a failed CI run on a
merge-train PR posts its build log to the train's channel.
next has no merge queue, so the dequeued job never runs. The workflow keeps its other job, the
post when a merge-train PR merges, and is renamed after it: merge-train-notify.yml.
@AztecBot

AztecBot commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Flakey Tests

🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/de6a24c751508192�de6a24c7515081928;;�): cd labs && export root= ci3= && ANVIL_HARDFORK=amsterdam  yarn-project/end-to-end/scripts/run_test.sh simple src/multi-node/slashing/inactivity_slash.test.ts (265s) (code: 0) group:e2e-p2p-epoch-flakes
\033FLAKED\033 (8;;http://ci.aztec-labs.com/7da2f3127878310a�7da2f3127878310a8;;�): cd labs && export root= ci3= &&  yarn-project/end-to-end/scripts/run_test.sh simple src/multi-node/slashing/broadcasted_invalid_block_proposal_slash.test.ts (118s) (code: 0) group:e2e-p2p-epoch-flakes

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants